package view;

import javax.swing.JFrame;
import javax.swing.JPanel;

import model.Set;

/**
 * Monitor window
 * @author Adrien Ledeul
 * @version 0.1
 */
public class MonitorWindow extends JFrame
{
	private static final long serialVersionUID = 1L;
	
	private MonitorPanel pane;
	
	private Set set;
	
	/**
	 * Constructors
	 * 
	 */
	public MonitorWindow(Set set)
	{
		super();
		this.set = set;
		this.build();
	}
	
	/**
	 * Getters & Setters
	 * 
	 */
	public Set getSet() 
	{
		return set;
	}
	
	
	/**
	 * Build the window
	 */
	private void build()
	{		
		this.setTitle("Monitor"); 
		this.setSize(800,600); 
		this.setLocationRelativeTo(null); 
		this.setResizable(false); 
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
		this.setContentPane(this.buildContentPane());
	}
	
	/**
	 * Build the panel for the window
	 */
	private JPanel buildContentPane()
	{
		pane = new MonitorPanel(this);
		return pane;
	}
}